Skip to content

fix: use DirectoryStream to prevent failure on invalid utf-8 filenames #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

transaero21
Copy link

You can create invalid file using touch "$(echo -e '\xEB\xEE\xE2\xE0\xF0\xE8')"
Unfortunately in Lollipop ang higher ART is used, and it can't handle some symbols - https://stackoverflow.com/a/34282026
There is not many options to read directory files, and another option only available on Oreo and higher - use DirectoryStream, which will not throw exception

You can create invalid file using `touch "$(echo -e '\xEB\xEE\xE2\xE0\xF0\xE8')"`
Unfortunately in Lollipop ang higher ART is used, and it can't handle some symbols - https://stackoverflow.com/a/34282026
There is not many options to read directory files, and another option only available on Oreo and higher - use DirectoryStream, which will not throw exception
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant